﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
public partial class main : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["USERNAME"] == null)
        {
            Response.Redirect("error_log.aspx", true);
        }
        if (Session["IDENTITY"].Equals("manager") == true)
        {
            if(Request.Params["q"]!=null)
                Page.RegisterStartupScript("ss", "<script>alert('"+Request.Params["q"]+"')</script>");

        }
        else if (Session["IDENTITY"].Equals("employee") == true)
        {//销售用户身份
            
            if (Request.Params["q"] != null)
                Page.RegisterStartupScript("ss", "<script>alert('" + Request.Params["q"] + "')</script>");
        }
        else
        {
            Response.Redirect("error_log.aspx", true);
        }

    }
    
}
